/**
 * Created by hps on 17-4-30.
 */
public class LinkStack {
    private LinkList1 theList;

    public LinkStack() {
        theList = new LinkList1();
    }

    public void push(long value) {
        theList.insertFirst(value);
    }

    public long pop() {
        return theList.deleteFirst();
    }

    public boolean isEmpty() {
        return theList.isEmpty();
    }

    public void displayStack() {
        System.out.print("Stack (top-->bottom): ");
        theList.displayList();
    }
}
